#include <iostream>
#include <math.h>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
#define _data_max 1000000
int main() {
	int d_count = 0;
	int a_data[50];
	int sum = 1;
	cin>>d_count;
	for(int i=0;i<d_count;i++)
	{
		cin>>a_data[i];
	}
	for(int i=0;i<d_count;i++)
	{
		sum *= a_data[i];
		if(sum > _data_max){
			cout<<">1000000";
			//TODO
		//	break;
		return 0;
		
		}
	}
	
	cout<<sum;
	return 0;
}
